//
//  AppiCloud.h
//  Personal Passlock
//
//  Created by 杨岑 on 5/6/15.
//  Copyright (c) 2015 杨岑. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface AppiCloud : NSObject
@property (readonly) NSURL* baseURL;
@property (readonly) NSURL* docsURL;
@property (readonly) id iCloudToken;
@property (readonly) NSString* localDocsDir;

+ (instancetype)singleton;
// Note: handler will be called in a dipatch queue that is not the main queue.
- (BOOL)setupiCloud:(void (^)(BOOL success))handler;
- (NSURL*)formatDocURL:(NSString*)docName;
- (NSString*)formatLocalDocPath:(NSString*)docName;

@end
